package com.acme.bankapp.domain.bank;

public class SavingAccount extends AbstractAccount {

	public SavingAccount(double amount) {
		super(amount);
	}

	@Override
	public String toString() {
		return "Saving " + super.toString() + " ";
	}

	@Override
	public int hashCode() {
		return super.hashCode()*31 + 1231;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SavingAccount other = (SavingAccount) obj;
		if (Double.doubleToLongBits(balance) != Double
				.doubleToLongBits(other.balance))
			return false;
		if (id != other.id)
			return false;
		return true;
	}

}
